<include file="App/Home/View/Public/header.html"/>
<!-----------------------------头部 结束------------------------------>
<!-----------------------------主体内容 开始------------------------------>
<style>
.ui-btn-inline {
	width: 87%;
	margin-top: 2em;
	background-color: rgba(255,255,255,0) !important;
	text-shadow: none;
	border: none;
	box-shadow: none;
	background-color: #ffc703 !important;
	color: #333 !important;
	text-shadow: none !important;
}
.ui-shadow-inset {
	background-color: rgba(255,255,255,0) !important;
	text-shadow: none;
	border: 1px solid #ffc703 !important;
	box-shadow: none;
	background-color: rgba(0,0,0,0.5) !important;
}

</style>

  <div data-role="main" class="ui-content">
  <!------登录表单 开始------->
    <form class="w80p btc_tcoin" method="post" action="" onsubmit="return false;">
      <div class="ui-field-contain padt_5">
        <label for="address" class="ui-hidden-accessible">{$Think.lang.__BITEBIDIZHI__}</label>
        <input type="text" name="address" value="{$bit_address}" id="address" disabled="disabled"  placeholder="{$Think.lang.__BITEBIDIZHI__}" />
      </div>
      <div class="ui-field-contain padt_5">
        <label for="address1" class="ui-hidden-accessible">{$Think.lang.__PINTAIDIZHI__}</label>
        <input type="text" name="address" value="{$config.BIT_ADDRESS}" id="address1" disabled="disabled"  placeholder="{$Think.lang.__PINTAIDIZHI__}" />
      </div>
      <div class="ui-field-contain padt_5">
        <label for="lkumber" class="ui-hidden-accessible">{$Think.lang.__QINGSHURULUNKASHULIANG__}</label>
        <input type="text" name="lkumber" id="lkumber" required onchange="ajaxget();"  placeholder="{$Think.lang.__QINGSHURULUNKASHULIANG__}" />
      </div>
      <div class="ui-field-contain padt_5">
        <label for="bitnum" class="ui-hidden-accessible">{$Think.lang.__XUCHONGZHIBITEBISHULIANG__}</label>
        <input type="text" name="btcnumber" id="bitnum" disabled="disabled"  placeholder="{$Think.lang.__XUCHONGZHIBITEBISHULIANG__}" />
      </div>
      <div class="ui-field-contain padt_5">
        <label for="password2" class="ui-hidden-accessible">{$Think.lang.__QINGSHURUJIAOYIMIMA__}</label>
        <input type="password" name="password2" id="password2" required placeholder="{$Think.lang.__QINGSHURUJIAOYIMIMA__}">
      </div>
      <input class="w100p" type="submit" onclick="ajaxSubmit();" data-inline="true" value="{$Think.lang.__CHONGZHI__}">
    </form>
  <!------登录表单 结束------->
  <eq name="status" value="1">&nbsp;&nbsp;&nbsp;{$Think.lang.__GAIZHANGHAOWEIJIHUO__}</eq>
  <!------一键分享介绍 开始------->
  <p>
    <div class="logo1 w80p">
      <div class="pad0_5">
        <p class="textcolor_yellow1">
          <span>{$Think.lang.__CHONGZHI__}</span>
        </p>
        <p class="textcolor_yellow1 sizeem8">
          <span>{$Think.lang.__CHONGBINEIRONG__}</span>
        </p>
      </div>
    </div>
    <div class="clear"></div>
  </p>
  <!------一键分享介绍 结束------>
  <!------充币记录链接 开始------>
  <p>
    <div class="w80p">
     <a class="float_r coin_jl" href="{:U('Recharge/jilu')}" data-ajax="false" >{$Think.lang.__CHONGBIJILU__}</a>
    </div>
    <div class="clear"></div>
  </p>
  <!------充币记录链接 结束------>

</div>
<!-----------------------------主体内容 结束------------------------------> 
<script type="text/javascript">
	function ajaxSubmit(){
		var lk_num = $('#lkumber').val();
		var bit_num = $('#bitnum').val();
		var password = $('#password2').val();
		var bit_addr = $('#address').val();
		if(lk_num == ""){
			layer.msg('请填写充值伦卡数量');
			return false;
		}
		if(bit_num == ""){
			layer.msg('网络异常');
			return false;
		}
		
		if(bit_addr == "请先到个人中心补全比特币地址"){
			layer.msg('请先到个人中心补全比特币地址');
			return false;

		}
		$.ajax({
			url:"{:U('Recharge/recharge')}",
			type:"POST",
			data:{'password':password,'bit_num':bit_num,'lk_num':lk_num},
			dataType:'json',
			success:function (data){
				layer.msg(data.info);
				if(data.status == 1){
					document.location.href  = "{:U('Recharge/success')}?id="+data.id;
				}
			}
		})
	
	
	}
</script>
<script type="text/javascript">
  function ajaxget(){
		var num = $('#lkumber').val();
		$.ajax({
			url:"{:U('Recharge/ajaxBit')}",
			type:'POST',
			data:{'lk_num':num},
			dataType:"JSON",
			success:function (data){
				if(data.status == 1){
					$("#bitnum").val(data.info);
				}else{
					layer.msg(data.info);
				}
			}
		})
  }
</script>

<include file="App/Home/View/Public/footer.html"/>